<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

/**
 * App\Models\ShopModelName
 *
 * @property int $model_id
 * @property string|null $model_name
 * @property int $shop_id
 * @property-read \Illuminate\Database\Eloquent\Collection|\App\Models\ShopModelValue[] $modelValues
 * @property-read \App\Models\Shop $shop
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShopModelName whereModelId($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShopModelName whereModelName($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShopModelName whereShopId($value)
 * @mixin \Eloquent
 */
class ShopModelName extends Model
{
    protected $table = 'shop_model_name';
    protected $primaryKey = 'model_id';
    protected $guarded = [];

    public $timestamps = false;

    public function shop()
    {
        return $this->belongsTo(Shop::class, 'shop_id', 'shop_id');
    }

    public function modelValues()
    {
        return $this->hasMany(ShopModelValue::class, 'model_id', 'model_id');
    }
}
